package com.wp.controller;

import com.wp.service.GoodsStockService04_redisson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: WangPeng
 * @createTime: 2022/12/08 14:07
 * @description:
 * @version: v1.0
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    //private GoodsStockService goodsStockService;
    //private GoodsStockService_syn goodsStockService;
    //private GoodsStockService_redis goodsStockService;

    private GoodsStockService04_redisson goodsStockService;

    @GetMapping("/incr/{id}")
    public String incr(@PathVariable Integer id){
        return goodsStockService.decrement(id);
    }

}
